package com.slj.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 采购订单表 记录采购订单信息
 * </p>
 *
 * @author 礼俊
 * @since 2025-09-20 22:46
 */
@Getter
@Setter
@ToString
@TableName("purchase_orders")
@Schema(name = "PurchaseOrders", description = "采购订单表 记录采购订单信息")
public class PurchaseOrders extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 订单唯一标识符
     */
    @Schema(description = "订单唯一标识符")
    @TableId(value = "order_id", type = IdType.AUTO)
    private String orderId;

    /**
     * 供应商Id
     */
    @Schema(description = "供应商Id")
    @TableField(value = "supplier_id")
    private Integer supplierId;

    /**
     * 订单日期
     */
    @TableField("order_date")
    @Schema(description = "订单日期")
    private Date orderDate;

    /**
     * 总金额
     */
    @TableField("total_amount")
    @Schema(description = "总金额")
    private Double totalAmount;

    /**
     * 订单状态 0：未发货   1：发货中  2：已发货  3：已收货
     */
    @TableField("status")
    @Schema(description = "订单状态 0：未发货   1：发货中  2：已发货  3：已退货 4:已完成")
    private int status;

    /**
     * 供应商名称
     */
    @TableField("supplier_name")
    @Schema(description = "供应商名称")
    private String supplierName;
    //发货 时间
    @TableField("shipment")
    @Schema(description = "发货时间")
    private Date shipment;
    //退货时间
    @TableField("return_time")
    @Schema(description = "退货时间")
    private Date returnTime;
    //收货 时间
    @TableField("receipt_time")
    @Schema(description = "收货时间")
    private Date receiptTime;
}
